require "SimpleMapController"
require "PullRefreshTableViewController"
	
waxClass{"AppDelegate", protocols = {"UIApplicationDelegate"}}

function applicationDidFinishLaunching(self, application)
	local frame = UIScreen:mainScreen():bounds()
	self.window = UIWindow:initWithFrame(frame)
	self.window:setBackgroundColor(UIColor:whiteColor())
	
	--self.controller = SimpleMapController:init()
	self.controller = PullRefreshTableViewController:initWithStyle(UITableViewStyleGrouped)
	self.window:addSubview(self.controller:tableView())
	
	self.window:makeKeyAndVisible()
end


-- require "StatesTable"
-- require "CapitalsTable"

-- waxClass{"AppDelegate", protocols = {"UIApplicationDelegate"}}

-- function applicationDidFinishLaunching(self, application)
--   local frame = UIScreen:mainScreen():bounds()
--   self.window = UIWindow:initWithFrame(frame)
--   self.window:setBackgroundColor(UIColor:orangeColor())  
--   self.window:makeKeyAndVisible()
  
--   local statesTable = StatesTable:init()
--   self.navigationController = UINavigationController:initWithRootViewController(statesTable)

--   self.window:addSubview(self.navigationController:view())
-- end

